var a=[1,2];
a.push('A','B')  
console.log(a)
a.pop('')
console.log(a)
a.pop();a.pop();a.pop();
console.log(a);

var b=[1,2];
b.unshift('A','B');
console.log(b)
b.shift();
console.log(b);
b.shift();b.shift();b.shift();
console.log(b)

var c=[1,25,65,5,9]
c.sort();
console.log(c);
c.reverse();
console.log(c);
var d=['A','C','F','B']
d.sort();
console.log(d)
d.reverse();
console.log(d);

var e=['A','B','C','D','E','F'];
e.splice(2,3,'a','b')
console.log(e)

var r=['A','B','C']
r.splice(2,1)
console.log(r)

var t=['A','B','C','D','E','F'];
t.splice(2,0,'X','Y')
console.log(t)



var arr=[2,1,5,621,45,63]
arr.arrarr=function()
{
    for(var j=0;j<this.length;j++)
    {
        var item=this[j]
        var idx=0
        for(var i=j+1;i<this.length;i++)
        {
            if(this[i]<item)
            {
                item=this[i]
                idx=i
            }
        }
        if (this[j] !== item){
            var a=this[j]
            this[j]=this[idx]
            this[idx]=a
        }
        console.log(arr)
    }
}
arr.arrarr()

                                   